from django.conf.urls import url
from .views import *


urlpatterns = [
    # 商品列表页
    url(r'^list/(?P<category_id>\d+)/(?P<page_num>\d+)/$', ListView.as_view(), name='list'),

    # 商品列表页面热销榜
    url(r'^hot/(?P<category_id>\d+)/$', HottView.as_view(), name='hot'),

    # 商品热销榜
    url(r'^detail/(?P<sku_id>\d+)/$', DetailView.as_view(), name='detail'),


    # 统计类别商品的访问量
    url(r'^detail/visit/(?P<category_id>\d+)/$', DetailVisitView.as_view(), name='visit'),

    # 个人中心订单展示

    url(r'^orders/info/(?P<page_num>\d+)/$', OrderShowView.as_view(), name='show'),

    # http://www.meiduo.site:8000/orders/?page=1&page_size=5
    # url(r'^orders/$', GetOrderView.as_view(), name='show'),

    # 订单评价页面
    # orders/20190828150530000000005/comments/
    url('^orders/comment/$', CommentView.as_view()),

    # 提交订单评价/orders/20190828150530000000005/comments/
    url('^orders/(?P<order_id>\d+)/comments/$', PutCommentView.as_view()),
    # 商品评论展示
    url('^comment/(?P<sku_id>\d+)/$', CommentSKUView.as_view()),

]

